package ink.tiptop.dto.req.local.view;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * 服务远程视图(ZjfServiceRemoteView)请求查询类
 *
 * @author zjf
 * @since 2020-07-22 08:45:34
 */
@Getter
@Setter
public class ScanZjfModuleLocalViewRequest implements Serializable {
    private static final long serialVersionUID = 7596479335620751882L;

    //{
    //    SCAN_USER: "admin",
    //    SCAN_VERSION: "001",
    //    SCAN_SERVER: "27",
    //}
    /**
     * 关联服务器配置信息
     */
    @JsonProperty("SCAN_USER")
    @NotBlank(message = "要扫描的服务器ID不能为空")
    private String user;
    /**
     * 关联服务器配置信息
     */
    @JsonProperty("SCAN_VERSION")
    @NotBlank(message = "版本信息不能为空")
    private String version;
    /**
     * 关联服务器配置信息
     */
    @JsonProperty("SCAN_SERVER")
    @NotNull(message = "要扫描的服务器ID不能为空")
    private Integer serverId;
    /**
     * 远程扫描路径
     */
    @JsonProperty("SCAN_PATH_REMOTE")
    @NotBlank(message = "要扫描的远程服务路径不能为空")
    @Pattern(regexp = "^(\\/.*)$"
            , message = "扫描路径用绝对路径")
    private String pathRemote;
    /**
     * 本地扫描路径
     */
//    @JsonProperty("SCAN_PATH_LOCAL")
//    @NotBlank(message = "要扫描的路径不能为空")
////    @Pattern(regexp = "^(\\/.*)$"
////            ,message = "本地扫描路径用绝对路径")
//    private String pathLocal;

}